package com.global.emc.spring.exception.handler.emcexception;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;

import com.global.emc.core.exception.IEMCException;

/**   
 *  
 * @Description:  [处理IEMCException类型异常]   
 * @Author:       [Joly_Huang]   
 * @CreateDate:   [2014年2月20日 下午5:31:43]   
 * @UpdateUser:   [Joly_Huang]   
 * @UpdateDate:   [2014年2月20日 下午5:31:43]   
 * @UpdateRemark: [说明本次修改内容]  
 * @Version:      [v1.0] 
 *    
 */
public class EMCExceptionHandler extends LoggerEMCExceptionHandler {

	@Override
	public boolean supports(IEMCException emcException) {
		return emcException instanceof IEMCException;
	}
	
	@Override
	public void handlerException(HttpServletRequest request, HttpServletResponse response, Object handlerMethod, IEMCException emcException, ModelAndView modelAndView) {
		this.logger.error(super.exceptionLog(request, emcException, handlerMethod), (Exception)emcException);
	}

}
